<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="org.apache.log4j.Logger"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
		<div id="content">
			<h3>
				系统运行期错误:
			</h3>
			<script language="text/javascript">
        	function showDetail()
        	{
        	    if (detail_error_msg.style.display == 'none')
        	        detail_error_msg.style.display = '';
        	    else
        	        detail_error_msg.style.display = 'none';
        	}
    		</script>			
			<div class="buttonActive">
				<div class="buttonContent">
					<button type="button" onclick="showDetail();">查看错误详情</button>
				</div>
			</div>
			<div id="detail_error_msg" style="display: none">
				<pre>
					<%
						Exception e = (Exception) request.getAttribute("exception");
						if (e != null) {
							Logger.getLogger(basePath).error(e.getMessage(), e);
							e.printStackTrace(new java.io.PrintWriter(out));
						}
					%>
				</pre>
			</div>
		</div>
